package com.simple.gateway.center.domian.manage.bo;

import com.simple.gateway.center.basedata.po.GatewayServerDetail;
import com.simple.gateway.center.domian.manage.dto.GatewayServerDetailDTO;
import lombok.Data;

/**
 * 项目: simple-gateway-core
 *
 * 功能描述:
 *
 * @author: WuChengXing
 *
 * @create: 2023-08-07 11:29
 **/
@Data
public class GatewayServerDetailBO {

    /**
     * 网关标识
     */
    private String gatewayId;
    /**
     * 网关名称
     */
    private String gatewayName;
    /**
     * 网关地址
     */
    private String gatewayAddress;
    /**
     * 服务状态
     */
    private Integer status;

    public static GatewayServerDetailDTO bo2Dto(GatewayServerDetailBO bo) {
        GatewayServerDetailDTO dto = new GatewayServerDetailDTO();
        dto.setGatewayId(bo.getGatewayId());
        dto.setGatewayName(bo.getGatewayName());
        dto.setGatewayAddress(bo.getGatewayAddress());
        dto.setStatus(bo.getStatus());
        return dto;
    }

    public static GatewayServerDetailBO do2Bo(GatewayServerDetail gatewayServerDetail) {
        GatewayServerDetailBO bo = new GatewayServerDetailBO();
        bo.setGatewayId(gatewayServerDetail.getGatewayId());
        bo.setGatewayName(gatewayServerDetail.getGatewayName());
        bo.setGatewayAddress(gatewayServerDetail.getGatewayAddress());
        bo.setStatus(gatewayServerDetail.getStatus());
        return bo;
    }
}
